#results
  - if (params[:q].strip.length > 0 rescue false)
    %h1
      Search results for '#{params[:q]}'
  - if @graphpoints
    #visual
    :javascript
      $(function() {
        var graphdata = #{@graphpoints.to_json};
        window.logstash.plot(graphdata);
      });
  - if @total and @result_start and @result_end
    %small
      %strong
        Results #{@result_start} - #{@result_end} of #{@total}
      |
      - if @prev_href
        %a.pager{ :href => @prev_href } 
          prev
        - if @next_href
          |
      - if @next_href
        %a.pager{ :href => @next_href }
          next
  %ul.results
    - @hits.reverse.each do |hit|
      %li.event{ :"data-full" => hit.to_json }&= hit["_source"]["@message"]
    - if @hits.length == 0 
      - if !params[:q]
        No query given. How about <a href="?q=*" class="querychanger">this?</a>
      - else
        No results for query '#{params[:q]}' 
